﻿using Analyse.DrawingPerformance.Contract;
using BenchmarkDotNet.Running;
using System;
using System.Diagnostics;

namespace Analyse.DrawingPerformance
{
    class Program
    {
        static void Main(string[] args)
        {
            //var test = new SharpDxDrawingEngine();
            //while (true)
            //{
            //    var sw = new Stopwatch();
            //    sw.Start();

            //    var imageData = test.Draw(1920, 1080, null);
            //    sw.Stop();
            //    var elapsed = sw.Elapsed.TotalMilliseconds;
            //    Console.WriteLine(elapsed);
            //}


            var test = new WindowsMediaDrawingEngine();
            while (true)
            {
                var sw = new Stopwatch();
                sw.Start();

                var imageData = test.Draw(1920, 1080, null);
                sw.Stop();
                var elapsed = sw.Elapsed.TotalMilliseconds;
                Console.WriteLine(elapsed);
            }

            var summary = BenchmarkRunner.Run<EngineBenchmark>();
        }
    }
}
